-
-
Notifications
You must be signed in to change notification settings - Fork 364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python module: support multiple instances #6
Merged
wcawijngaards
merged 2 commits into
NLnetLabs:master
from
episource:dev/pythonmod-multi-instance/master
Jun 18, 2019
Merged
Python module: support multiple instances #6
wcawijngaards
merged 2 commits into
NLnetLabs:master
from
episource:dev/pythonmod-multi-instance/master
Jun 18, 2019
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If you are willing to accept all of the pull requests #4, #5, #6, you could also consider merging dev/all-merged/master instead: All three patches have been merged into this single branch. |
This was referenced Apr 30, 2018
This commit adds proper support for multiple instances of the python module: When more than one instance is added to the module list, the first instance loads the first script specified in the `python:` configuration section. The second instance loads the second script, and so on. When there are more module instances in the module list than there are scripts in the `python:` section, an error is raised during initialization and unbound won't start. When more scripts than module instances are provided, the surplus scripts are ignored.
Thank you for the python changes. The pull requests did not exist yet when you created them. We moved to github, so we can insert them from here. I merged the all-merged branch as you suggested. |
jedisct1
added a commit
to jedisct1/unbound
that referenced
this pull request
Jun 29, 2019
* nlnet/master: (22 commits) Nicer spelling and layout. - For NLnetLabs#45, check that 127.0.0.1 and ::1 are not used in unbound.conf when do-not-query-localhost is turned on, or at default on, unbound-checkconf prints a warning if it is found in forward-addr or stub-addr statements. - Fix memleak in unit test, reported from the clang 8.0 static analyzer. - Fix python dict reference and double free in config. - Merge PR NLnetLabs#6: Python module: support multiple instances - Merge PR NLnetLabs#5: Python module: define constant MODULE_RESTART_NEXT - Merge PR NLnetLabs#4: Python module: assign something useful to the per-query data store 'qdata' Noted in Changelog. - Added documentation to the ipset files (for doxygen output). - make depend - Fix to make unbound-control with ipset, remove unused variable, use unsigned type because of comparison, and assign null instead of compare with it. Remade lex and yacc output. - PR NLnetLabs#28: IPSet module, by Kevin Chou. Created a module to support the ipset that could add the domain's ip to a list easily. Needs libmnl, and --enable-ipset and config it, doc/README.ipset.md. - Fix to omit RRSIGs from addition to the ipset. - Fix for NLnetLabs#24: Fix abort due to scan of auth zone masters using old address from previous scan. - Fix NLnetLabs#39: In libunbound, leftover logfile is close()d unpredictably. - Master contains version 1.9.3 in development. fix segmentation fault rollback the code bugfix performance improvement edit config parser to support ipset Add support for ipset Document how to configure multiple python modules Support multiple python module instances ...
Closed
gthess
pushed a commit
to internetstandards/unbound
that referenced
this pull request
Apr 9, 2021
Incorporate unbound_1.8.0_patch_unsupported_ds.diff into the source code
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, it's not possible to use multiple instances of the python module. Nevertheless, adding the word
python
to themodule-config:
option several times is not rejected by unbound. In the end, however, it's not a usable setup supported by unbound.The proposed solution allows to reference the python module more than once within
module-config:
option. For each instance, apython-script:
option needs to be added to thepython:
section, specifying the python script file to be used. The first python module picks up the firstpython-script:
option, the second picks up the second script, and so on.I've been successfully using this patch with unbound-1.6.0, 1.6.1, 1.6.4 and 1.7.0.
See also: https://www.nlnetlabs.nl/bugs-script/show_bug.cgi?id=1213
(Pull-Requests were disabled when I created this ticket)